<template>
 <!-- 菜单 -->
 <ul class="nav">
      <li >APP项目</li>
      <li @click="onJump('a', '/')" class="nav-item">首页</li>
      <li @click="onJump('a', '/about')" class="nav-item">关于</li>
      <li>北京项目</li>
      <li @click="onJump('b', '/')" class="nav-item">首页</li>
      <li @click="onJump('b', '/about')" class="nav-item">关于</li>
      <li @click="onJump('b', '/total')" class="nav-item">统计</li>
      <li>南京项目</li>
      <li @click="onJump('n', '/')" class="nav-item">首页</li>
      <li @click="onJump('n', '/about')" class="nav-item">关于</li>
      <li @click="onJump('n', '/info')" class="nav-item">详情</li>
    </ul>
</template>
<script setup lang="ts">
const projectKey:any = {
  'a': '/#',
  'b': '/beijing.html#',
  'n': '/nanjing.html#',
}

const onJump = (project:string,path: string) => {
  window.location.href = (projectKey[project] || '') + path
}
</script>